/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Interface.java
 *
 * Created on Dec 26, 2011, 9:23:38 AM
 */
package Interface;

import Conexao.GerenciaConexao;
import Dados.Enderecos;
import Dados.Fila;
import Dados.FilaInt;
import Dados.GerenciaTabela;
import Dados.Pacote;
import Dados.TueModel;
import Instrumentos.GerenciaInstrumentos;
import Instrumentos.GraficoTemperatura;
import java.awt.Toolkit;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

/**
 *
 * @author brunomaiademorais
 */
public class Interface extends javax.swing.JFrame {
    
    
    int numeroEstacoes = 1;
    int numero_estacoes = 0;
    int numero_estacoes_aux = 0;
    String[] ips;
    int[] portas;
    int iterador = 0;
    GerenciaConexao conexoes = null;
    Fila fila_tabela = null;
    Fila fila_instrumentos = null;
    Fila fila_bd = null;    
    FilaInt fila_grafico;
    Enderecos lista_enderecos;
    TueModel modelo_tabela = null;
    ArrayList<Pacote> dados = null;    
    GerenciaTabela tabela = null;
    GerenciaInstrumentos gerente_instrumentos;
    GraficoTemperatura grafico_temperatura;

    /** Creates new form Interface */
    public Interface() {
        iniciaVariaveis();
        initComponents();
        setJanelas();        
        setEnderecos();
        setInstrumentos();
        //todosOsPaineisFalse();
        this.setLocationRelativeTo(null);
    }
    
    public void iniciaVariaveis() {
        this.fila_tabela = new Fila();
        this.fila_instrumentos = new Fila();
        this.fila_grafico = new FilaInt();
        this.dados = new ArrayList();
        this.modelo_tabela = new TueModel(this.dados);
        grafico_temperatura = new GraficoTemperatura("Temperatura");
    }
    
    public void setInstrumentos() {
        painel_grafico.add(grafico_temperatura.getComponent(0));
    }
    
    public void setEnderecos() {
        

        this.lista_enderecos = new Enderecos(numeroEstacoes);

        for(int i = 0; i < lista_enderecos.getEnderecos().length; i++) {
            dados.add(new Pacote());
        }
    }
    
    public boolean validaNumeroEstacoes(String numero_estacoes) {

        
        for(int i = 0; i < numero_estacoes.length(); i++) {
            if(numero_estacoes.charAt(i) < 48 || numero_estacoes.charAt(i) > 57) {
                return false;
            }
            else {
                return true;
            }            
        }
        return false;
    }
    
    public void setJanelaIPPorta(boolean status, int estacao) {
        if(status) {
            label_janela_ip_porta_titulo.setText("Digite o IP e a Porta do servidor "+(estacao+1));
            iterador++;
            janela_ip_porta.setVisible(true);
        }
        else {
            janela_ip_porta.setVisible(false);
            texto_janela_ip_porta_ip.setText("");
            texto_janela_ip_porta_porta.setText("");
        }
    }
    
    public void todosOsPaineisFalse() {
        painelTabela.setVisible(false);
    }
    
    public void setJanelas() {
        janela_ip_porta.setModal(true);
        janela_ip_porta.pack();
        janela_ip_porta.setLocationRelativeTo(null);
        janela_ip_porta.getRootPane().setDefaultButton(botao_janela_ip_porta_ok);
        
        janela_grafico.setModal(true);
        janela_grafico.pack();
        janela_grafico.setLocationRelativeTo(null);
    }
    
    public void mostraTabela() {        
        this.tabelaDados.setModel(this.modelo_tabela);
        this.tabela = new GerenciaTabela(this.modelo_tabela, this.fila_tabela);
        painelTabela.setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        janela_ip_porta = new javax.swing.JDialog();
        label_janela_ip_porta_titulo = new javax.swing.JLabel();
        label_janela_ip_porta_ip = new javax.swing.JLabel();
        texto_janela_ip_porta_ip = new javax.swing.JTextField();
        label_janela_ip_porta_porta = new javax.swing.JLabel();
        texto_janela_ip_porta_porta = new javax.swing.JTextField();
        barra_janela_ip_porta = new javax.swing.JToolBar();
        botao_janela_ip_porta_ok = new javax.swing.JButton();
        botao_janela_ip_porta_cancela = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        janela_grafico = new javax.swing.JDialog();
        painel_principal_janela_grafico = new javax.swing.JPanel();
        painel_grafico = new javax.swing.JPanel();
        barra_grafico = new javax.swing.JSlider();
        painelBotoes = new javax.swing.JPanel();
        barraPrincipal = new javax.swing.JToolBar();
        btConectar = new javax.swing.JButton();
        painelTabela = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabelaDados = new javax.swing.JTable();
        botao_grafico = new javax.swing.JButton();

        janela_ip_porta.setTitle("Conexão");
        janela_ip_porta.setResizable(false);
        janela_ip_porta.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                janela_ip_portaWindowClosing(evt);
            }
        });

        label_janela_ip_porta_titulo.setText("Digite o IP e a Porta do servidor 1");

        label_janela_ip_porta_ip.setText("IP:");

        label_janela_ip_porta_porta.setText("Porta:");

        barra_janela_ip_porta.setFloatable(false);
        barra_janela_ip_porta.setRollover(true);

        botao_janela_ip_porta_ok.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/Crystal_Clear_app_clean.png"))); // NOI18N
        botao_janela_ip_porta_ok.setFocusable(false);
        botao_janela_ip_porta_ok.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        botao_janela_ip_porta_ok.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        botao_janela_ip_porta_ok.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botao_janela_ip_porta_okActionPerformed(evt);
            }
        });
        barra_janela_ip_porta.add(botao_janela_ip_porta_ok);

        botao_janela_ip_porta_cancela.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/Crystal_Clear_action_stop.png"))); // NOI18N
        botao_janela_ip_porta_cancela.setFocusable(false);
        botao_janela_ip_porta_cancela.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        botao_janela_ip_porta_cancela.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        botao_janela_ip_porta_cancela.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botao_janela_ip_porta_cancelaActionPerformed(evt);
            }
        });
        barra_janela_ip_porta.add(botao_janela_ip_porta_cancela);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/MY NETWORK.png"))); // NOI18N

        org.jdesktop.layout.GroupLayout janela_ip_portaLayout = new org.jdesktop.layout.GroupLayout(janela_ip_porta.getContentPane());
        janela_ip_porta.getContentPane().setLayout(janela_ip_portaLayout);
        janela_ip_portaLayout.setHorizontalGroup(
            janela_ip_portaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(janela_ip_portaLayout.createSequentialGroup()
                .addContainerGap(29, Short.MAX_VALUE)
                .add(janela_ip_portaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, janela_ip_portaLayout.createSequentialGroup()
                        .add(label_janela_ip_porta_titulo)
                        .add(18, 18, 18)
                        .add(jLabel1)
                        .add(8, 8, 8))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, janela_ip_portaLayout.createSequentialGroup()
                        .add(label_janela_ip_porta_ip)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(texto_janela_ip_porta_ip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(label_janela_ip_porta_porta)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(texto_janela_ip_porta_porta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 86, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, barra_janela_ip_porta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        janela_ip_portaLayout.setVerticalGroup(
            janela_ip_portaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(janela_ip_portaLayout.createSequentialGroup()
                .add(janela_ip_portaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(janela_ip_portaLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jLabel1))
                    .add(janela_ip_portaLayout.createSequentialGroup()
                        .add(32, 32, 32)
                        .add(label_janela_ip_porta_titulo)))
                .add(19, 19, 19)
                .add(janela_ip_portaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(label_janela_ip_porta_ip)
                    .add(texto_janela_ip_porta_ip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(label_janela_ip_porta_porta)
                    .add(texto_janela_ip_porta_porta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(barra_janela_ip_porta, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                .addContainerGap())
        );

        painel_principal_janela_grafico.setBackground(new java.awt.Color(255, 255, 255));

        painel_grafico.setLayout(new java.awt.GridLayout());

        org.jdesktop.layout.GroupLayout painel_principal_janela_graficoLayout = new org.jdesktop.layout.GroupLayout(painel_principal_janela_grafico);
        painel_principal_janela_grafico.setLayout(painel_principal_janela_graficoLayout);
        painel_principal_janela_graficoLayout.setHorizontalGroup(
            painel_principal_janela_graficoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painel_principal_janela_graficoLayout.createSequentialGroup()
                .addContainerGap()
                .add(painel_principal_janela_graficoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(painel_principal_janela_graficoLayout.createSequentialGroup()
                        .add(barra_grafico, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 690, Short.MAX_VALUE)
                        .addContainerGap())
                    .add(painel_principal_janela_graficoLayout.createSequentialGroup()
                        .add(painel_grafico, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 690, Short.MAX_VALUE)
                        .add(10, 10, 10))))
        );
        painel_principal_janela_graficoLayout.setVerticalGroup(
            painel_principal_janela_graficoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, painel_principal_janela_graficoLayout.createSequentialGroup()
                .addContainerGap(82, Short.MAX_VALUE)
                .add(painel_grafico, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 321, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(barra_grafico, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout janela_graficoLayout = new org.jdesktop.layout.GroupLayout(janela_grafico.getContentPane());
        janela_grafico.getContentPane().setLayout(janela_graficoLayout);
        janela_graficoLayout.setHorizontalGroup(
            janela_graficoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painel_principal_janela_grafico, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        janela_graficoLayout.setVerticalGroup(
            janela_graficoLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painel_principal_janela_grafico, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("InteliCare");
        setBackground(new java.awt.Color(255, 255, 255));
        setResizable(false);

        painelBotoes.setBackground(new java.awt.Color(255, 255, 255));
        painelBotoes.setPreferredSize(new java.awt.Dimension(800, 79));

        barraPrincipal.setBackground(new java.awt.Color(255, 255, 255));
        barraPrincipal.setFloatable(false);
        barraPrincipal.setRollover(true);

        btConectar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/C_desconectado.png"))); // NOI18N
        btConectar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btConectarActionPerformed(evt);
            }
        });
        barraPrincipal.add(btConectar);

        org.jdesktop.layout.GroupLayout painelBotoesLayout = new org.jdesktop.layout.GroupLayout(painelBotoes);
        painelBotoes.setLayout(painelBotoesLayout);
        painelBotoesLayout.setHorizontalGroup(
            painelBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(barraPrincipal, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 873, Short.MAX_VALUE)
        );
        painelBotoesLayout.setVerticalGroup(
            painelBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(barraPrincipal, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
        );

        painelTabela.setBackground(new java.awt.Color(255, 255, 255));
        painelTabela.setPreferredSize(new java.awt.Dimension(800, 532));

        tabelaDados.setModel(modelo_tabela);
        jScrollPane1.setViewportView(tabelaDados);

        botao_grafico.setText("Gráfico");
        botao_grafico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botao_graficoActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout painelTabelaLayout = new org.jdesktop.layout.GroupLayout(painelTabela);
        painelTabela.setLayout(painelTabelaLayout);
        painelTabelaLayout.setHorizontalGroup(
            painelTabelaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painelTabelaLayout.createSequentialGroup()
                .add(107, 107, 107)
                .add(botao_grafico)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(168, Short.MAX_VALUE))
        );
        painelTabelaLayout.setVerticalGroup(
            painelTabelaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painelTabelaLayout.createSequentialGroup()
                .add(painelTabelaLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(painelTabelaLayout.createSequentialGroup()
                        .add(36, 36, 36)
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(painelTabelaLayout.createSequentialGroup()
                        .add(45, 45, 45)
                        .add(botao_grafico)))
                .addContainerGap(94, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(painelBotoes, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 873, Short.MAX_VALUE)
            .add(painelTabela, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(painelBotoes, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(painelTabela, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void btConectarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btConectarActionPerformed
String numeroEstacoesBase = "";

      numeroEstacoesBase = JOptionPane.showInputDialog(this, "A quantas estações você deseja se conectar?", "Estacões", JOptionPane.QUESTION_MESSAGE);

      if(!numeroEstacoesBase.equals("")) {
          if(validaNumeroEstacoes(numeroEstacoesBase)) {
              this.numero_estacoes = Integer.parseInt(numeroEstacoesBase);
              this.ips = new String[numero_estacoes];
              this.portas = new int[numero_estacoes];
              numero_estacoes_aux = numero_estacoes;
              setJanelaIPPorta(true, this.iterador);
          }
          else {
              JOptionPane.showMessageDialog(this, "Digite um valor válido", "Erro", JOptionPane.ERROR_MESSAGE);
          }
      }
    
    
    
}//GEN-LAST:event_btConectarActionPerformed

private void botao_janela_ip_porta_okActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botao_janela_ip_porta_okActionPerformed
        this.ips[this.numero_estacoes_aux - 1] =  this.texto_janela_ip_porta_ip.getText();
        this.portas[this.numero_estacoes_aux - 1] = Integer.parseInt(this.texto_janela_ip_porta_porta.getText());
        setJanelaIPPorta(false, 0);
        this.numero_estacoes_aux--;
        if(this.numero_estacoes_aux > 0) {
            setJanelaIPPorta(true, this.iterador);
        }
        else {
            this.conexoes = new GerenciaConexao(this.ips, this.portas, this.fila_tabela, this.fila_instrumentos, this.fila_bd, true, true, false, this.lista_enderecos);
            ImageIcon icone = new ImageIcon("src/Imagens/C_conectado.png");
            btConectar.setIcon(icone);
            mostraTabela();
        }
}//GEN-LAST:event_botao_janela_ip_porta_okActionPerformed

private void botao_janela_ip_porta_cancelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botao_janela_ip_porta_cancelaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_botao_janela_ip_porta_cancelaActionPerformed

private void janela_ip_portaWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_janela_ip_portaWindowClosing
// TODO add your handling code here:
}//GEN-LAST:event_janela_ip_portaWindowClosing

private void botao_graficoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botao_graficoActionPerformed
        gerente_instrumentos = new GerenciaInstrumentos(fila_instrumentos, fila_grafico, grafico_temperatura, barra_grafico);
        janela_grafico.setVisible(true);
}//GEN-LAST:event_botao_graficoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Interface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Interface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Interface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Interface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Interface().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JToolBar barraPrincipal;
    private javax.swing.JSlider barra_grafico;
    private javax.swing.JToolBar barra_janela_ip_porta;
    private javax.swing.JButton botao_grafico;
    private javax.swing.JButton botao_janela_ip_porta_cancela;
    private javax.swing.JButton botao_janela_ip_porta_ok;
    private javax.swing.JButton btConectar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JDialog janela_grafico;
    private javax.swing.JDialog janela_ip_porta;
    private javax.swing.JLabel label_janela_ip_porta_ip;
    private javax.swing.JLabel label_janela_ip_porta_porta;
    private javax.swing.JLabel label_janela_ip_porta_titulo;
    private javax.swing.JPanel painelBotoes;
    private javax.swing.JPanel painelTabela;
    private javax.swing.JPanel painel_grafico;
    private javax.swing.JPanel painel_principal_janela_grafico;
    private javax.swing.JTable tabelaDados;
    private javax.swing.JTextField texto_janela_ip_porta_ip;
    private javax.swing.JTextField texto_janela_ip_porta_porta;
    // End of variables declaration//GEN-END:variables
}
